/**
 * 〈用户管理〉
 *
 * @author 王青杰
 * @create 2018-03-2510:25
 * @since 1.0.0
 */
package com.example.controller;

import com.example.base.BaseController;
import com.example.entity.TbUser;
import com.example.util.ResultMsg;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/user")
public class UserController extends BaseController {

    @PostMapping
    public ResultMsg insert(TbUser user){
        return userService.insert(user);
    }

    @DeleteMapping("/{userId}")
    public ResultMsg delete(@PathVariable("userId")int userId){
        return userService.delete(userId);
    }

    @PutMapping
    public TbUser update(TbUser user){
        return null;
    }


}
